<?php

namespace App\Models;


use App\Libs\DataFormat;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;


class UserMessage extends Model
{

    use DataFormat;

    protected  $table='user_message';

    public static  $typeConf = ['0'=>'群发', '1'=>'私人'];

    public static  $formatKey = ['id'=>'int', 'type'=>'int', 'title'=>'string', 'content'=>'string', 'publish_time'=>'string',];

    public function user()
    {
        return $this->hasOne('App\Models\User', 'id', 'from_user_id');
    }


}
